<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title></title>
  <style>
    canvas {
      box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
    }
  </style>
</head>
<body>
  <canvas id="canvas" width="800" height="600"></canvas>
  <script>
    const canvas = document.getElementById('canvas');
    const ctx = canvas.getContext('2d');
    
    const W = canvas.width = 800;
    const H = canvas.height = 600;
    
    let imageData = ctx.getImageData(0, 0, W, H);
    let picData = imageData.data;
    
    // for(let i=0; i<picData.length; i+=4){
    //   picData[i] = 255;
    //   picData[i+1] = 40;
    //   picData[i+2] = 80;
    //   picData[i+3] = 100;
    // }
    
    for(let i=0; i<H; i++){
      for(let j=0; j<W; j++){
        picData[(i*W+j)*4] = 255;
        picData[(i*W+j)*4 + 1] = 255;
        picData[(i*W+j)*4 + 2] = 0;
        picData[(i*W+j)*4 + 3] = 255;
      }
    }
    
    ctx.putImageData(imageData, 0, 0);
    
  </script>
</body>
</html>